#include <stdio.h>
#define N 2
int max(int a, int b);
int min(int a, int b);
int main(int argc, char *argv[])
{
    int value[N], *p;
    p = value;
    while(scanf("%d%d", p, &p[1]) != EOF) {
        printf("%d, %d\n", max(*p, p[1]), min(*p, p[1]));
    }
    return 0;
}

int max(int a, int b) {
    return a > b ? a : b;
}

int min(int a, int b) {
    return a < b ? a : b;
}
